package com.one.login.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.one.login.service.UserService;

@Controller
@RequestMapping(value = "/user", method = { RequestMethod.POST })
public class UserController {

	@Autowired
	private UserService userService;

	@ResponseBody
	@RequestMapping(value = "/getLoginUserInfo")
	public Object getLoginUserInfo(@RequestParam(required = true) String st) {
		return userService.getLoginUserInfo(st);
	}

	@RequestMapping(value = "/login")
	public void login(@RequestParam(required = true) String username, @RequestParam(required = true) String password) {
		userService.login(username, password);
	}

}
